package javacafe.action.seminar;

import javacafe.dto.event.SeminarDTO;
import javacafe.serviceimple.SeminarServiceImple;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import javacafe.action.Action;
import javacafe.action.ActionForward;

public class SeminarCarendarAction implements Action {

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {

		ActionForward actfoward = new ActionForward();
		SeminarServiceImple service = SeminarServiceImple.getInstance();
		String year = request.getParameter("year");
		String month = request.getParameter("month");
		
		List<SeminarDTO> lists = service.getAllSeminar();

		request.setAttribute("sLists", lists);
		
		request.setAttribute("year", year);
		request.setAttribute("month", month);
		actfoward.setUrl("mycalendar");
		return actfoward;
	}

}
